﻿using Electric.Core;
using Electric.Domain.Entitys.Commons;
using Electric.Domain.Entitys.Identity;
using Electric.Domain.Shared.Entitys.Todo;


namespace Electric.Domain.Entitys.Todos
{

    public class EleTodo : AuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// todo title
        /// </summary>
        public string Name { get;  set; }

        /// <summary>
        /// 状态，0 undo：，1：done
        /// </summary>
        public TodoStatus Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }


        /// <summary>
        /// 所属人的UserId，外键
        /// </summary>
        public Guid UserId { get; protected set; }

        /// <summary>
        /// 所属人
        /// </summary>
        public EleUser EleUser { get; set; }
        public void SetUserId(Guid id)
        {
            Check.NotNull(id, nameof(id));
            UserId = id;
        }
    }
}
